home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
pasprog.EXE
/
KEYMAPD.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-04-03
|
1KB
|
45 lines
uses crt,dos;
var
klavye : array[0..127] of boolean;
olay : boolean;
procedure yeni_kesme;interrupt;
var
bilgi : byte;
eski_durum : boolean;
begin
bilgi:=port[$60];
eski_durum:=klavye[bilgi and 127];
klavye[bilgi and 127]:=not(boolean((bilgi and 128)=128));
if eski_durum<>klavye[bilgi and 127] then olay:=true;
port[$20]:=$20;
end;
var
eski_kesme : pointer;
ekran : array[0..24,0..79] of word absolute $b800:0;
n : byte;
begin
clrscr;
gotoxy(1,20);
write(' Programdan çìkmak için *Esc* tuƒuna basìn');
olay:=true;
for n:=0 to 127 do klavye[n]:=false;
getintvec(9,eski_kesme);
setintvec(9,@yeni_kesme);
repeat
if olay=true then
begin
olay:=false;
for n:=0 to 127 do
if klavye[n]=true
then ekran[(n div 16)*2,(n mod 16)*4]:=ord('▄')+(7*256)
else ekran[(n div 16)*2,(n mod 16)*4]:=ord('▒')+(7*256);
end;
until klavye[1]=true; {esc}
setintvec(9,eski_kesme);
end.